#ifndef __UTIL_GPIO_H__
#define __UTIL_GPIO_H__

typedef enum
{
    DIR_IN = 0,
    DIR_OUT = 1,
} DIR_E;

typedef enum
{
    EDGE_NONE = 0,
    EDGE_RISING,
    EDGE_FALLING,
    EDGE_BOTE,
} EDGE_E;

int gpio_export(unsigned int gpio_num);
int gpio_unexport(unsigned int gpio_num);

int gpio_set_edge(unsigned int gpio_num, EDGE_E mode);
int gpio_set_direction(unsigned int gpio_num, DIR_E dir);

int gpio_read(unsigned int gpio_num);
int gpio_write(unsigned int gpio_num, int state);


#endif /* __UTIL_GPIO_H__ */